import {updateStateRequest} from '../../api/driver/vehicle.js'

const state={

	// 是否处于运输中状态
	isTransport: false
};

const mutations={

	changeTransportState: (state, data) => {
		state.isTransport = data;
	}
}
const actions={

	CHANGETRANSPORTSTATE({commit},data) {
		updateStateRequest({vehicle: JSON.stringify(data)}).then(res => {
			commit('changeTransportState',data.isTransport);	
		})
	}
   
}
export default{
    namespaced:true,
    mutations,
    actions,
    state
}